#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/rules/patchsys-quilt.mk

export MONO_SHARED_DIR := /tmp

post-patches:: debian/stamp-build
debian/stamp-build:
	(cd FlickrNet; $(SHELL) ../compile.sh)
	touch $@

clean::
	$(RM) FlickrNet/FlickrNet.dll FlickrNet/FlickrNet.dll.mdb debian/stamp-build

install/libflickrnet2.1.5-cil::
	dh_install FlickrNet/FlickrNet.dll /usr/lib/cli/flickrnet-2.1.5/
	-find debian/ -type f -name "*.dll" | xargs chmod -x

binary-install/libflickrnet2.1.5-cil::
	dh_installcligac -plibflickrnet2.1.5-cil

binary-predeb/libflickrnet2.1.5-cil::
	dh_makeclilibs -plibflickrnet2.1.5-cil
	dh_clideps -d

get-orig-source:
	sh debian/orig-tar.sh $(DEB_UPSTREAM_VERSION)
